(0) Obligation:

Clauses:

flatten(atom(X), .(X, [])).
flatten(cons(atom(X), U), .(X, Y)) :- flatten(U, Y).
flatten(cons(cons(U, V), W), X) :- flatten(cons(U, cons(V, W)), X).
count(atom(X), s(0)).
count(cons(atom(X), Y), s(Z)) :- count(Y, Z).
count(cons(cons(U, V), W), Z) :- ','(flatten(cons(cons(U, V), W), X), count(X, Z)).

Query: count(g,a)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

flattenA(atom(T97), .(T97, [])).
flattenA(cons(atom(T106), T107), .(T106, X158)) :- flattenA(T107, X158).
flattenA(cons(cons(T116, T117), T118), X175) :- flattenB(T116, T117, T118, X175).
flattenB(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) :- flattenA(T90, X131).
flattenB(atom(T78), cons(T125, T126), T127, .(T78, X192)) :- flattenB(T125, T126, T127, X192).
flattenB(cons(T136, T137), T138, T139, X209) :- flattenB(T136, T137, cons(T138, T139), X209).
flattenC(T63, T64, T65, X85) :- flattenB(T63, T64, T65, X85).
countD(atom(T4), s(0)).
countD(cons(atom(T8), atom(T16)), s(s(0))).
countD(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) :- countD(T30, T32).
countD(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) :- flattenC(T51, T52, T53, X60).
countD(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) :- ','(flattenC(T51, T52, T53, T56), countD(T56, T55)).
countD(cons(cons(T157, T158), T159), T150) :- flattenB(T157, T158, T159, X247).
countD(cons(cons(T157, T158), T159), T150) :- ','(flattenB(T157, T158, T159, T160), countD(T160, T150)).

Query: countD(g,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
countD_in: (b,f)
flattenC_in: (b,b,b,f)
flattenB_in: (b,b,b,f)
flattenA_in: (b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

countD_in_ga(atom(T4), s(0)) → countD_out_ga(atom(T4), s(0))
countD_in_ga(cons(atom(T8), atom(T16)), s(s(0))) → countD_out_ga(cons(atom(T8), atom(T16)), s(s(0)))
countD_in_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_ga(T8, T29, T30, T32, countD_in_ga(T30, T32))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U8_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, X60)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_ga(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
countD_in_ga(cons(cons(T157, T158), T159), T150) → U11_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
U11_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, X247)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
countD_in_ga(cons(cons(T157, T158), T159), T150) → U12_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_ga(T157, T158, T159, T150, countD_in_ga(T160, T150))
U13_ga(T157, T158, T159, T150, countD_out_ga(T160, T150)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
U10_ga(T8, T51, T52, T53, T55, countD_out_ga(T56, T55)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
U7_ga(T8, T29, T30, T32, countD_out_ga(T30, T32)) → countD_out_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32)))

The argument filtering Pi contains the following mapping:
countD_in_ga(x1, x2)  =  countD_in_ga(x1)
atom(x1)  =  atom(x1)
countD_out_ga(x1, x2)  =  countD_out_ga
cons(x1, x2)  =  cons(x1, x2)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
U9_ga(x1, x2, x3, x4, x5, x6)  =  U9_ga(x6)
U10_ga(x1, x2, x3, x4, x5, x6)  =  U10_ga(x6)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
.(x1, x2)  =  .(x1, x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

countD_in_ga(atom(T4), s(0)) → countD_out_ga(atom(T4), s(0))
countD_in_ga(cons(atom(T8), atom(T16)), s(s(0))) → countD_out_ga(cons(atom(T8), atom(T16)), s(s(0)))
countD_in_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_ga(T8, T29, T30, T32, countD_in_ga(T30, T32))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U8_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, X60)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_ga(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
countD_in_ga(cons(cons(T157, T158), T159), T150) → U11_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
U11_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, X247)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
countD_in_ga(cons(cons(T157, T158), T159), T150) → U12_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_ga(T157, T158, T159, T150, countD_in_ga(T160, T150))
U13_ga(T157, T158, T159, T150, countD_out_ga(T160, T150)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
U10_ga(T8, T51, T52, T53, T55, countD_out_ga(T56, T55)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
U7_ga(T8, T29, T30, T32, countD_out_ga(T30, T32)) → countD_out_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32)))

The argument filtering Pi contains the following mapping:
countD_in_ga(x1, x2)  =  countD_in_ga(x1)
atom(x1)  =  atom(x1)
countD_out_ga(x1, x2)  =  countD_out_ga
cons(x1, x2)  =  cons(x1, x2)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
U9_ga(x1, x2, x3, x4, x5, x6)  =  U9_ga(x6)
U10_ga(x1, x2, x3, x4, x5, x6)  =  U10_ga(x6)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
.(x1, x2)  =  .(x1, x2)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_GA(T8, T29, T30, T32, countD_in_ga(T30, T32))
COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → COUNTD_IN_GA(T30, T32)
COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_GA(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → FLATTENC_IN_GGGA(T51, T52, T53, X60)
FLATTENC_IN_GGGA(T63, T64, T65, X85) → U6_GGGA(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
FLATTENC_IN_GGGA(T63, T64, T65, X85) → FLATTENB_IN_GGGA(T63, T64, T65, X85)
FLATTENB_IN_GGGA(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_GGGA(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
FLATTENB_IN_GGGA(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → FLATTENA_IN_GA(T90, X131)
FLATTENA_IN_GA(cons(atom(T106), T107), .(T106, X158)) → U1_GA(T106, T107, X158, flattenA_in_ga(T107, X158))
FLATTENA_IN_GA(cons(atom(T106), T107), .(T106, X158)) → FLATTENA_IN_GA(T107, X158)
FLATTENA_IN_GA(cons(cons(T116, T117), T118), X175) → U2_GA(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
FLATTENA_IN_GA(cons(cons(T116, T117), T118), X175) → FLATTENB_IN_GGGA(T116, T117, T118, X175)
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_GGGA(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127, .(T78, X192)) → FLATTENB_IN_GGGA(T125, T126, T127, X192)
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139, X209) → U5_GGGA(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139, X209) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139), X209)
COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_GA(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_GA(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_GA(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
U9_GA(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → COUNTD_IN_GA(T56, T55)
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → U11_GA(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → FLATTENB_IN_GGGA(T157, T158, T159, X247)
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → U12_GA(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_GA(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_GA(T157, T158, T159, T150, countD_in_ga(T160, T150))
U12_GA(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → COUNTD_IN_GA(T160, T150)

The TRS R consists of the following rules:

countD_in_ga(atom(T4), s(0)) → countD_out_ga(atom(T4), s(0))
countD_in_ga(cons(atom(T8), atom(T16)), s(s(0))) → countD_out_ga(cons(atom(T8), atom(T16)), s(s(0)))
countD_in_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_ga(T8, T29, T30, T32, countD_in_ga(T30, T32))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U8_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, X60)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_ga(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
countD_in_ga(cons(cons(T157, T158), T159), T150) → U11_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
U11_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, X247)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
countD_in_ga(cons(cons(T157, T158), T159), T150) → U12_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_ga(T157, T158, T159, T150, countD_in_ga(T160, T150))
U13_ga(T157, T158, T159, T150, countD_out_ga(T160, T150)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
U10_ga(T8, T51, T52, T53, T55, countD_out_ga(T56, T55)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
U7_ga(T8, T29, T30, T32, countD_out_ga(T30, T32)) → countD_out_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32)))

The argument filtering Pi contains the following mapping:
countD_in_ga(x1, x2)  =  countD_in_ga(x1)
atom(x1)  =  atom(x1)
countD_out_ga(x1, x2)  =  countD_out_ga
cons(x1, x2)  =  cons(x1, x2)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
U9_ga(x1, x2, x3, x4, x5, x6)  =  U9_ga(x6)
U10_ga(x1, x2, x3, x4, x5, x6)  =  U10_ga(x6)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
.(x1, x2)  =  .(x1, x2)
COUNTD_IN_GA(x1, x2)  =  COUNTD_IN_GA(x1)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x5)
U8_GA(x1, x2, x3, x4, x5, x6)  =  U8_GA(x6)
FLATTENC_IN_GGGA(x1, x2, x3, x4)  =  FLATTENC_IN_GGGA(x1, x2, x3)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x5)
FLATTENB_IN_GGGA(x1, x2, x3, x4)  =  FLATTENB_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4, x5)  =  U3_GGGA(x1, x2, x5)
FLATTENA_IN_GA(x1, x2)  =  FLATTENA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x5)
U4_GGGA(x1, x2, x3, x4, x5, x6)  =  U4_GGGA(x1, x6)
U5_GGGA(x1, x2, x3, x4, x5, x6)  =  U5_GGGA(x6)
U9_GA(x1, x2, x3, x4, x5, x6)  =  U9_GA(x6)
U10_GA(x1, x2, x3, x4, x5, x6)  =  U10_GA(x6)
U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x5)
U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x5)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x5)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_GA(T8, T29, T30, T32, countD_in_ga(T30, T32))
COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → COUNTD_IN_GA(T30, T32)
COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_GA(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → FLATTENC_IN_GGGA(T51, T52, T53, X60)
FLATTENC_IN_GGGA(T63, T64, T65, X85) → U6_GGGA(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
FLATTENC_IN_GGGA(T63, T64, T65, X85) → FLATTENB_IN_GGGA(T63, T64, T65, X85)
FLATTENB_IN_GGGA(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_GGGA(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
FLATTENB_IN_GGGA(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → FLATTENA_IN_GA(T90, X131)
FLATTENA_IN_GA(cons(atom(T106), T107), .(T106, X158)) → U1_GA(T106, T107, X158, flattenA_in_ga(T107, X158))
FLATTENA_IN_GA(cons(atom(T106), T107), .(T106, X158)) → FLATTENA_IN_GA(T107, X158)
FLATTENA_IN_GA(cons(cons(T116, T117), T118), X175) → U2_GA(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
FLATTENA_IN_GA(cons(cons(T116, T117), T118), X175) → FLATTENB_IN_GGGA(T116, T117, T118, X175)
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_GGGA(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127, .(T78, X192)) → FLATTENB_IN_GGGA(T125, T126, T127, X192)
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139, X209) → U5_GGGA(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139, X209) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139), X209)
COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_GA(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_GA(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_GA(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
U9_GA(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → COUNTD_IN_GA(T56, T55)
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → U11_GA(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → FLATTENB_IN_GGGA(T157, T158, T159, X247)
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → U12_GA(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_GA(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_GA(T157, T158, T159, T150, countD_in_ga(T160, T150))
U12_GA(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → COUNTD_IN_GA(T160, T150)

The TRS R consists of the following rules:

countD_in_ga(atom(T4), s(0)) → countD_out_ga(atom(T4), s(0))
countD_in_ga(cons(atom(T8), atom(T16)), s(s(0))) → countD_out_ga(cons(atom(T8), atom(T16)), s(s(0)))
countD_in_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_ga(T8, T29, T30, T32, countD_in_ga(T30, T32))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U8_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, X60)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_ga(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
countD_in_ga(cons(cons(T157, T158), T159), T150) → U11_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
U11_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, X247)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
countD_in_ga(cons(cons(T157, T158), T159), T150) → U12_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_ga(T157, T158, T159, T150, countD_in_ga(T160, T150))
U13_ga(T157, T158, T159, T150, countD_out_ga(T160, T150)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
U10_ga(T8, T51, T52, T53, T55, countD_out_ga(T56, T55)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
U7_ga(T8, T29, T30, T32, countD_out_ga(T30, T32)) → countD_out_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32)))

The argument filtering Pi contains the following mapping:
countD_in_ga(x1, x2)  =  countD_in_ga(x1)
atom(x1)  =  atom(x1)
countD_out_ga(x1, x2)  =  countD_out_ga
cons(x1, x2)  =  cons(x1, x2)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
U9_ga(x1, x2, x3, x4, x5, x6)  =  U9_ga(x6)
U10_ga(x1, x2, x3, x4, x5, x6)  =  U10_ga(x6)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
.(x1, x2)  =  .(x1, x2)
COUNTD_IN_GA(x1, x2)  =  COUNTD_IN_GA(x1)
U7_GA(x1, x2, x3, x4, x5)  =  U7_GA(x5)
U8_GA(x1, x2, x3, x4, x5, x6)  =  U8_GA(x6)
FLATTENC_IN_GGGA(x1, x2, x3, x4)  =  FLATTENC_IN_GGGA(x1, x2, x3)
U6_GGGA(x1, x2, x3, x4, x5)  =  U6_GGGA(x5)
FLATTENB_IN_GGGA(x1, x2, x3, x4)  =  FLATTENB_IN_GGGA(x1, x2, x3)
U3_GGGA(x1, x2, x3, x4, x5)  =  U3_GGGA(x1, x2, x5)
FLATTENA_IN_GA(x1, x2)  =  FLATTENA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x5)
U4_GGGA(x1, x2, x3, x4, x5, x6)  =  U4_GGGA(x1, x6)
U5_GGGA(x1, x2, x3, x4, x5, x6)  =  U5_GGGA(x6)
U9_GA(x1, x2, x3, x4, x5, x6)  =  U9_GA(x6)
U10_GA(x1, x2, x3, x4, x5, x6)  =  U10_GA(x6)
U11_GA(x1, x2, x3, x4, x5)  =  U11_GA(x5)
U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x5)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x5)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 14 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

FLATTENB_IN_GGGA(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → FLATTENA_IN_GA(T90, X131)
FLATTENA_IN_GA(cons(atom(T106), T107), .(T106, X158)) → FLATTENA_IN_GA(T107, X158)
FLATTENA_IN_GA(cons(cons(T116, T117), T118), X175) → FLATTENB_IN_GGGA(T116, T117, T118, X175)
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127, .(T78, X192)) → FLATTENB_IN_GGGA(T125, T126, T127, X192)
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139, X209) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139), X209)

The TRS R consists of the following rules:

countD_in_ga(atom(T4), s(0)) → countD_out_ga(atom(T4), s(0))
countD_in_ga(cons(atom(T8), atom(T16)), s(s(0))) → countD_out_ga(cons(atom(T8), atom(T16)), s(s(0)))
countD_in_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_ga(T8, T29, T30, T32, countD_in_ga(T30, T32))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U8_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, X60)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_ga(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
countD_in_ga(cons(cons(T157, T158), T159), T150) → U11_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
U11_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, X247)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
countD_in_ga(cons(cons(T157, T158), T159), T150) → U12_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_ga(T157, T158, T159, T150, countD_in_ga(T160, T150))
U13_ga(T157, T158, T159, T150, countD_out_ga(T160, T150)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
U10_ga(T8, T51, T52, T53, T55, countD_out_ga(T56, T55)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
U7_ga(T8, T29, T30, T32, countD_out_ga(T30, T32)) → countD_out_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32)))

The argument filtering Pi contains the following mapping:
countD_in_ga(x1, x2)  =  countD_in_ga(x1)
atom(x1)  =  atom(x1)
countD_out_ga(x1, x2)  =  countD_out_ga
cons(x1, x2)  =  cons(x1, x2)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
U9_ga(x1, x2, x3, x4, x5, x6)  =  U9_ga(x6)
U10_ga(x1, x2, x3, x4, x5, x6)  =  U10_ga(x6)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
.(x1, x2)  =  .(x1, x2)
FLATTENB_IN_GGGA(x1, x2, x3, x4)  =  FLATTENB_IN_GGGA(x1, x2, x3)
FLATTENA_IN_GA(x1, x2)  =  FLATTENA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

FLATTENB_IN_GGGA(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → FLATTENA_IN_GA(T90, X131)
FLATTENA_IN_GA(cons(atom(T106), T107), .(T106, X158)) → FLATTENA_IN_GA(T107, X158)
FLATTENA_IN_GA(cons(cons(T116, T117), T118), X175) → FLATTENB_IN_GGGA(T116, T117, T118, X175)
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127, .(T78, X192)) → FLATTENB_IN_GGGA(T125, T126, T127, X192)
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139, X209) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139), X209)

R is empty.
The argument filtering Pi contains the following mapping:
atom(x1)  =  atom(x1)
cons(x1, x2)  =  cons(x1, x2)
.(x1, x2)  =  .(x1, x2)
FLATTENB_IN_GGGA(x1, x2, x3, x4)  =  FLATTENB_IN_GGGA(x1, x2, x3)
FLATTENA_IN_GA(x1, x2)  =  FLATTENA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FLATTENB_IN_GGGA(atom(T78), atom(T89), T90) → FLATTENA_IN_GA(T90)
FLATTENA_IN_GA(cons(atom(T106), T107)) → FLATTENA_IN_GA(T107)
FLATTENA_IN_GA(cons(cons(T116, T117), T118)) → FLATTENB_IN_GGGA(T116, T117, T118)
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127) → FLATTENB_IN_GGGA(T125, T126, T127)
FLATTENB_IN_GGGA(cons(T136, T137), T138, T139) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

FLATTENB_IN_GGGA(atom(T78), atom(T89), T90) → FLATTENA_IN_GA(T90)
FLATTENA_IN_GA(cons(atom(T106), T107)) → FLATTENA_IN_GA(T107)
FLATTENA_IN_GA(cons(cons(T116, T117), T118)) → FLATTENB_IN_GGGA(T116, T117, T118)
FLATTENB_IN_GGGA(atom(T78), cons(T125, T126), T127) → FLATTENB_IN_GGGA(T125, T126, T127)
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(FLATTENA_IN_GA(x1)) = 1 + 2·x1   
POL(FLATTENB_IN_GGGA(x1, x2, x3)) = 2·x1 + 2·x2 + 2·x3   
POL(atom(x1)) = 1 + x1   
POL(cons(x1, x2)) = x1 + x2   

(15) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FLATTENB_IN_GGGA(cons(T136, T137), T138, T139) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(16) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • FLATTENB_IN_GGGA(cons(T136, T137), T138, T139) → FLATTENB_IN_GGGA(T136, T137, cons(T138, T139))
    The graph contains the following edges 1 > 1, 1 > 2

(17) YES

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_GA(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_GA(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → COUNTD_IN_GA(T56, T55)
COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → COUNTD_IN_GA(T30, T32)
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → U12_GA(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_GA(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → COUNTD_IN_GA(T160, T150)

The TRS R consists of the following rules:

countD_in_ga(atom(T4), s(0)) → countD_out_ga(atom(T4), s(0))
countD_in_ga(cons(atom(T8), atom(T16)), s(s(0))) → countD_out_ga(cons(atom(T8), atom(T16)), s(s(0)))
countD_in_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → U7_ga(T8, T29, T30, T32, countD_in_ga(T30, T32))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U8_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, X60))
flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U8_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, X60)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
countD_in_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_ga(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_ga(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → U10_ga(T8, T51, T52, T53, T55, countD_in_ga(T56, T55))
countD_in_ga(cons(cons(T157, T158), T159), T150) → U11_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, X247))
U11_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, X247)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
countD_in_ga(cons(cons(T157, T158), T159), T150) → U12_ga(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_ga(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → U13_ga(T157, T158, T159, T150, countD_in_ga(T160, T150))
U13_ga(T157, T158, T159, T150, countD_out_ga(T160, T150)) → countD_out_ga(cons(cons(T157, T158), T159), T150)
U10_ga(T8, T51, T52, T53, T55, countD_out_ga(T56, T55)) → countD_out_ga(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55))
U7_ga(T8, T29, T30, T32, countD_out_ga(T30, T32)) → countD_out_ga(cons(atom(T8), cons(atom(T29), T30)), s(s(T32)))

The argument filtering Pi contains the following mapping:
countD_in_ga(x1, x2)  =  countD_in_ga(x1)
atom(x1)  =  atom(x1)
countD_out_ga(x1, x2)  =  countD_out_ga
cons(x1, x2)  =  cons(x1, x2)
U7_ga(x1, x2, x3, x4, x5)  =  U7_ga(x5)
U8_ga(x1, x2, x3, x4, x5, x6)  =  U8_ga(x6)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
U9_ga(x1, x2, x3, x4, x5, x6)  =  U9_ga(x6)
U10_ga(x1, x2, x3, x4, x5, x6)  =  U10_ga(x6)
U11_ga(x1, x2, x3, x4, x5)  =  U11_ga(x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
.(x1, x2)  =  .(x1, x2)
COUNTD_IN_GA(x1, x2)  =  COUNTD_IN_GA(x1)
U9_GA(x1, x2, x3, x4, x5, x6)  =  U9_GA(x6)
U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x5)

We have to consider all (P,R,Pi)-chains

(19) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(20) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53)), s(T55)) → U9_GA(T8, T51, T52, T53, T55, flattenC_in_ggga(T51, T52, T53, T56))
U9_GA(T8, T51, T52, T53, T55, flattenC_out_ggga(T51, T52, T53, T56)) → COUNTD_IN_GA(T56, T55)
COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30)), s(s(T32))) → COUNTD_IN_GA(T30, T32)
COUNTD_IN_GA(cons(cons(T157, T158), T159), T150) → U12_GA(T157, T158, T159, T150, flattenB_in_ggga(T157, T158, T159, T160))
U12_GA(T157, T158, T159, T150, flattenB_out_ggga(T157, T158, T159, T160)) → COUNTD_IN_GA(T160, T150)

The TRS R consists of the following rules:

flattenC_in_ggga(T63, T64, T65, X85) → U6_ggga(T63, T64, T65, X85, flattenB_in_ggga(T63, T64, T65, X85))
flattenB_in_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131))) → U3_ggga(T78, T89, T90, X131, flattenA_in_ga(T90, X131))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192)) → U4_ggga(T78, T125, T126, T127, X192, flattenB_in_ggga(T125, T126, T127, X192))
flattenB_in_ggga(cons(T136, T137), T138, T139, X209) → U5_ggga(T136, T137, T138, T139, X209, flattenB_in_ggga(T136, T137, cons(T138, T139), X209))
U6_ggga(T63, T64, T65, X85, flattenB_out_ggga(T63, T64, T65, X85)) → flattenC_out_ggga(T63, T64, T65, X85)
U3_ggga(T78, T89, T90, X131, flattenA_out_ga(T90, X131)) → flattenB_out_ggga(atom(T78), atom(T89), T90, .(T78, .(T89, X131)))
U4_ggga(T78, T125, T126, T127, X192, flattenB_out_ggga(T125, T126, T127, X192)) → flattenB_out_ggga(atom(T78), cons(T125, T126), T127, .(T78, X192))
U5_ggga(T136, T137, T138, T139, X209, flattenB_out_ggga(T136, T137, cons(T138, T139), X209)) → flattenB_out_ggga(cons(T136, T137), T138, T139, X209)
flattenA_in_ga(atom(T97), .(T97, [])) → flattenA_out_ga(atom(T97), .(T97, []))
flattenA_in_ga(cons(atom(T106), T107), .(T106, X158)) → U1_ga(T106, T107, X158, flattenA_in_ga(T107, X158))
flattenA_in_ga(cons(cons(T116, T117), T118), X175) → U2_ga(T116, T117, T118, X175, flattenB_in_ggga(T116, T117, T118, X175))
U1_ga(T106, T107, X158, flattenA_out_ga(T107, X158)) → flattenA_out_ga(cons(atom(T106), T107), .(T106, X158))
U2_ga(T116, T117, T118, X175, flattenB_out_ggga(T116, T117, T118, X175)) → flattenA_out_ga(cons(cons(T116, T117), T118), X175)

The argument filtering Pi contains the following mapping:
atom(x1)  =  atom(x1)
cons(x1, x2)  =  cons(x1, x2)
flattenC_in_ggga(x1, x2, x3, x4)  =  flattenC_in_ggga(x1, x2, x3)
U6_ggga(x1, x2, x3, x4, x5)  =  U6_ggga(x5)
flattenB_in_ggga(x1, x2, x3, x4)  =  flattenB_in_ggga(x1, x2, x3)
U3_ggga(x1, x2, x3, x4, x5)  =  U3_ggga(x1, x2, x5)
flattenA_in_ga(x1, x2)  =  flattenA_in_ga(x1)
flattenA_out_ga(x1, x2)  =  flattenA_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_ggga(x1, x2, x3, x4, x5, x6)  =  U4_ggga(x1, x6)
U5_ggga(x1, x2, x3, x4, x5, x6)  =  U5_ggga(x6)
flattenB_out_ggga(x1, x2, x3, x4)  =  flattenB_out_ggga(x4)
flattenC_out_ggga(x1, x2, x3, x4)  =  flattenC_out_ggga(x4)
.(x1, x2)  =  .(x1, x2)
COUNTD_IN_GA(x1, x2)  =  COUNTD_IN_GA(x1)
U9_GA(x1, x2, x3, x4, x5, x6)  =  U9_GA(x6)
U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x5)

We have to consider all (P,R,Pi)-chains

(21) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53))) → U9_GA(flattenC_in_ggga(T51, T52, T53))
U9_GA(flattenC_out_ggga(T56)) → COUNTD_IN_GA(T56)
COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30))) → COUNTD_IN_GA(T30)
COUNTD_IN_GA(cons(cons(T157, T158), T159)) → U12_GA(flattenB_in_ggga(T157, T158, T159))
U12_GA(flattenB_out_ggga(T160)) → COUNTD_IN_GA(T160)

The TRS R consists of the following rules:

flattenC_in_ggga(T63, T64, T65) → U6_ggga(flattenB_in_ggga(T63, T64, T65))
flattenB_in_ggga(atom(T78), atom(T89), T90) → U3_ggga(T78, T89, flattenA_in_ga(T90))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127) → U4_ggga(T78, flattenB_in_ggga(T125, T126, T127))
flattenB_in_ggga(cons(T136, T137), T138, T139) → U5_ggga(flattenB_in_ggga(T136, T137, cons(T138, T139)))
U6_ggga(flattenB_out_ggga(X85)) → flattenC_out_ggga(X85)
U3_ggga(T78, T89, flattenA_out_ga(X131)) → flattenB_out_ggga(.(T78, .(T89, X131)))
U4_ggga(T78, flattenB_out_ggga(X192)) → flattenB_out_ggga(.(T78, X192))
U5_ggga(flattenB_out_ggga(X209)) → flattenB_out_ggga(X209)
flattenA_in_ga(atom(T97)) → flattenA_out_ga(.(T97, []))
flattenA_in_ga(cons(atom(T106), T107)) → U1_ga(T106, flattenA_in_ga(T107))
flattenA_in_ga(cons(cons(T116, T117), T118)) → U2_ga(flattenB_in_ggga(T116, T117, T118))
U1_ga(T106, flattenA_out_ga(X158)) → flattenA_out_ga(.(T106, X158))
U2_ga(flattenB_out_ggga(X175)) → flattenA_out_ga(X175)

The set Q consists of the following terms:

flattenC_in_ggga(x0, x1, x2)
flattenB_in_ggga(x0, x1, x2)
U6_ggga(x0)
U3_ggga(x0, x1, x2)
U4_ggga(x0, x1)
U5_ggga(x0)
flattenA_in_ga(x0)
U1_ga(x0, x1)
U2_ga(x0)

We have to consider all (P,Q,R)-chains.

(23) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

COUNTD_IN_GA(cons(atom(T8), cons(cons(T51, T52), T53))) → U9_GA(flattenC_in_ggga(T51, T52, T53))
U9_GA(flattenC_out_ggga(T56)) → COUNTD_IN_GA(T56)
COUNTD_IN_GA(cons(atom(T8), cons(atom(T29), T30))) → COUNTD_IN_GA(T30)
COUNTD_IN_GA(cons(cons(T157, T158), T159)) → U12_GA(flattenB_in_ggga(T157, T158, T159))
U12_GA(flattenB_out_ggga(T160)) → COUNTD_IN_GA(T160)
The following rules are removed from R:

flattenB_in_ggga(atom(T78), atom(T89), T90) → U3_ggga(T78, T89, flattenA_in_ga(T90))
flattenB_in_ggga(atom(T78), cons(T125, T126), T127) → U4_ggga(T78, flattenB_in_ggga(T125, T126, T127))
U6_ggga(flattenB_out_ggga(X85)) → flattenC_out_ggga(X85)
U4_ggga(T78, flattenB_out_ggga(X192)) → flattenB_out_ggga(.(T78, X192))
flattenA_in_ga(atom(T97)) → flattenA_out_ga(.(T97, []))
flattenA_in_ga(cons(atom(T106), T107)) → U1_ga(T106, flattenA_in_ga(T107))
flattenA_in_ga(cons(cons(T116, T117), T118)) → U2_ga(flattenB_in_ggga(T116, T117, T118))
U1_ga(T106, flattenA_out_ga(X158)) → flattenA_out_ga(.(T106, X158))
U2_ga(flattenB_out_ggga(X175)) → flattenA_out_ga(X175)
Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(COUNTD_IN_GA(x1)) = 2·x1   
POL(U12_GA(x1)) = 2 + 2·x1   
POL(U1_ga(x1, x2)) = 1 + 2·x1 + x2   
POL(U2_ga(x1)) = 1 + x1   
POL(U3_ggga(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U4_ggga(x1, x2)) = 1 + 2·x1 + x2   
POL(U5_ggga(x1)) = x1   
POL(U6_ggga(x1)) = 2 + x1   
POL(U9_GA(x1)) = 1 + 2·x1   
POL([]) = 0   
POL(atom(x1)) = 2 + 2·x1   
POL(cons(x1, x2)) = 2 + x1 + x2   
POL(flattenA_in_ga(x1)) = x1   
POL(flattenA_out_ga(x1)) = x1   
POL(flattenB_in_ggga(x1, x2, x3)) = x1 + x2 + x3   
POL(flattenB_out_ggga(x1)) = x1   
POL(flattenC_in_ggga(x1, x2, x3)) = 2 + x1 + x2 + x3   
POL(flattenC_out_ggga(x1)) = 1 + x1   

(24) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

flattenB_in_ggga(cons(T136, T137), T138, T139) → U5_ggga(flattenB_in_ggga(T136, T137, cons(T138, T139)))
U5_ggga(flattenB_out_ggga(X209)) → flattenB_out_ggga(X209)
U3_ggga(T78, T89, flattenA_out_ga(X131)) → flattenB_out_ggga(.(T78, .(T89, X131)))
flattenC_in_ggga(T63, T64, T65) → U6_ggga(flattenB_in_ggga(T63, T64, T65))

The set Q consists of the following terms:

flattenC_in_ggga(x0, x1, x2)
flattenB_in_ggga(x0, x1, x2)
U6_ggga(x0)
U3_ggga(x0, x1, x2)
U4_ggga(x0, x1)
U5_ggga(x0)
flattenA_in_ga(x0)
U1_ga(x0, x1)
U2_ga(x0)

We have to consider all (P,Q,R)-chains.

(25) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(26) YES